package njust.hitcourse;

import njust.course.CourseDAO;
import njust.user.UserDAO;
import njust.utils.DBUtil;

public class HitCourse {
    private int uId;
    private String uName;
    private int cId;
    private String cName;
    private int score;

    public HitCourse(){}

    public HitCourse(int uId,int cId,int score){
        this.uId=uId;
        this.cId=cId;
        this.score=score;
        CourseDAO courseDAO=new CourseDAO();
        UserDAO userDAO=new UserDAO();
        this.uName=userDAO.searchLoginByUserId(uId).getName();
        this.cName=courseDAO.findCourseById(cId).getCourseName();
    }

    public int getuId() {
        return uId;
    }

    public String getuName() {
        return uName;
    }

    public int getcId() {
        return cId;
    }

    public String getcName() {
        return cName;
    }

    public int getScore() {
        return score;
    }
}
